package com.tiankun.eurekaticket.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author liaopeng
 * @Date 2020/11/13 9:28
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Table(name = "tb_ticket")
public class Ticket implements Serializable {

    @Id
    @Column(name = "tkt_id")
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "tkt_name")
    private String name;

    @Column(name = "tkt_desc")
    private String desc;

    @Column(name = "tkt_quota")
    private Integer quota;

    @Column(name = "tkt_money")
    private Integer money;

    @Column(name = "tkt_collectExpire")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date collectExpire;

    @Column(name = "tkt_useExpire")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date useExpire;

    @Column(name = "tkt_img")
    private String img;

    @Column(name = "tkt_state")
    private Integer state;

    @Column(name = "tkt_random")
    private String random;

    @Column(name = "tkt_number")
    private Integer number;

    @Column(name = "shop_id")
    private Integer shopid;

}
